put round((wheelSpeed*timeElapsed)+(wheelRadius*sin(theta))) into item 1 of newPoint -- x-coordinate
put round(centerLine-(wheelRadius*cos(theta))) into item 2 of newPoint -- y-coordinate
if item 1 of newPoint > 412 then exit repeat
drag from oldPoint to newPoint
put newPoint into oldPoint
put timeElapsed+timeIncrement2 into timeElapsed
put theta+rotIncrement2 into theta
end repeat
choose browse tool
show menubar
put "Click on this field to restore the screen." into field "Blurb"
end runExperiment
-- part 2 (field)
-- low flags: 81
-- high flags: 2004
-- rect: left=11 top=40 right=326 bottom=403
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: Help
-- part 5 (button)
-- low flags: 00
-- high flags: A002
-- rect: left=16 top=319 right=340 bottom=76
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Return
----- HyperTalk script -----
on mouseUp
global ReturnCard
go ReturnCard
end mouseUp
-- part contents for background part 1
----- text -----
Press this field to begin tracing the path of the pen.
-- part contents for card part 2
----- text -----
This experiment deals with a pen mounted at the edge of a wheel which is mounted on top of a cart that is moving to the right at a constant velocity. the wheel rotates at a velocity independent of the speed of the cart and on an axis perpendicular to the direction of motion of the cart (i.e. straight out from the screen). The pen traces its path on a piece of clear plastic as it passes.
This card simulates that experiment. It will compute and draw the path of the pen based on the parameters you can set by clicking on the "Set Parameters" button in the control panel.